﻿@using ChinaHCM.QA.Site.Web.Models
@model Notice

@{
    ViewBag.Title = Model.Title;
}

<div>
    <dl>
        <dt>@Html.DisplayFor(model => model.Title)</dt>
        <dd>@Html.DisplayFor(model => model.Details)</dd>
        @if (Model.DwellTime >= 0)
        {
            <dd>系统将在 <span id="time">@Model.DwellTime </span>秒后跳转到 @Model.NavigationName。如未自动跳转请点击<a href="@Model.NavigationUrl">@Model.NavigationName</a>。</dd>
           <script type="text/javascript">
                function Jump(time) {
                    window.setTimeout(function () {
                        time--;
                        $("#time").text(time);
                        if (time > 0) Jump(time);
                        else location.href = "@Model.NavigationUrl";
                    }, 1000);
                }
                Jump(@Model.DwellTime);
            </script>
        }
    </dl>
</div>
